﻿
namespace Trentacular.SharePoint.StsAdmin
{
    public enum ParameterType
    {
        Flag,
        Optional,
        Required
    }

    public abstract class Parameter
    {
        public string Name { get; set; }
        
        public string Description { get; set; }

        public abstract ParameterType Type { get; }

        public bool IsSpecified { get; set; }

        public string Value { get; set; }

        public bool HasValue
        {
            get { return !string.IsNullOrEmpty(Value); }
        }
    }

    public class FlagParameter : Parameter
    {
        public override ParameterType Type
        {
            get { return ParameterType.Flag; }
        }
    }

    public class OptionalParameter : Parameter
    {
        public override ParameterType Type
        {
            get { return ParameterType.Optional; }
        }
    }

    public class RequiredParameter : Parameter
    {
        public override ParameterType Type
        {
            get { return ParameterType.Required; }
        }
    }
}
